const {  GET, Controller } = require("../common/decorator/http");
const  Authoication = require("../common/decorator/author");
const Movies = require("../model/movie");

@Controller("/movie")
class MovieController {
    constructor() {
    }
    
    @Authoication()
    @GET('/getTop250')
    async getTop250(ctx, next) {
        const data = await Movies.findAll({ attributes: ['id', 'description'] });
        ctx.body = data;
        next();
    }
}
module.exports = MovieController;
